from bs4 import BeautifulSoup								#导入库
soup = BeautifulSoup(open('index.html'),'lxml')					#创建对象
print(soup.head.children)									#输出children
for child in  soup.p.children:							#遍历获取子节点
    print(child)
